package com.lovo.lesson;

import java.util.Collection;
import java.util.HashMap;
import java.util.Set;

public class Test06 {
    public static void main(String[] args) {
        HashMap hashMap = new HashMap();
        hashMap.put("001",100);
        hashMap.put("002","hello map");
        hashMap.put("003",true);
        hashMap.put("004",new Student("小强",20,"男"));

        hashMap.remove("001");
        System.out.println(hashMap.get("001"));

        System.out.println(hashMap.containsKey("005"));

        System.out.println(hashMap.size());
        Set set = hashMap.keySet();
        for(Object key : set){
            System.out.println(key + ":" + hashMap.get(key));
        }
        Collection list = hashMap.values();
        for(Object value : list){
            System.out.println(value);
        }
    }
}
